package com.company.class8;

/**
 * @Classname EmailTest
 * @Description 类型说明
 * @Date 2022/5/2 16:00
 * @Created by zbw
 */

public class EmailTest {
    public static void main(String[] args) {
        String email = "roy@qq.com";
        String regex = "\\w{3,9}@\\w{2,10}(\\.(com|org|cn|edu)){1,2}";
        System.out.println(email.matches(regex));
    }
}
